#ifndef _SMDK2440_OV9650_H_
#define _SMDK2440_OV9650_H_

#define BUSHI_DEF 0
#define ISVGA	0//VGA
#define SVGA	1//800*600

static struct IIC_data {
	int subaddr;
	int value;
} CH7026_REGS_VGA_800[] = {
{ 0x02, 0x01 },
{ 0x02, 0x03 },
{ 0x06, 0x6B },
{ 0x08, 0x08 },
{ 0x09, 0x80 },
{ 0x0C, 0x82 },
{ 0x0D, 0x08 },
{ 0x0F, 0x23 },
{ 0x10, 0x20 },
{ 0x11, 0x11 },
{ 0x12, 0x40 },
{ 0x13, 0x32 },
{ 0x14, 0x0A },
{ 0x15, 0x12 },
{ 0x16, 0x58 },
{ 0x17, 0x9A },
{ 0x1B, 0x23 },
{ 0x1C, 0x20 },
{ 0x1D, 0x20 },
{ 0x1F, 0x25 },
{ 0x20, 0x80 },
{ 0x21, 0x12 },
{ 0x22, 0x58 },
{ 0x23, 0x74 },
{ 0x25, 0x0A },
{ 0x26, 0x04 },
{ 0x37, 0x20 },
{ 0x39, 0x20 },
{ 0x3B, 0x20 },
{ 0x4D, 0x02 },
{ 0x4E, 0xC7 },
{ 0x4F, 0x9B },
{ 0x50, 0x96 },
{ 0x51, 0x5B },
{ 0x52, 0x12 },
{ 0x53, 0x13 },
{ 0x55, 0xE5 },
{ 0x69, 0x64 },
{ 0x7D, 0x02 },
{ 0x04, 0x00 },
{ 0x06, 0x69 },
{ 0x06, 0x68 },
{ 0x02, 0x02 },
{ 0x02, 0x03 },
};
struct IIC_data CH7026_REGS_VGA_640[] = {
{ 0x02, 0x01 },
{ 0x02, 0x03 },
{ 0x03, 0x00 },
{ 0x04, 0x39 },
{ 0x08, 0x08 },
{ 0x09, 0x80 },
{ 0x0C, 0x82 },
{ 0x0D, 0x08 },
{ 0x0F, 0x1A },
{ 0x10, 0x80 },
{ 0x11, 0x3E },
{ 0x12, 0x40 },
{ 0x13, 0x5E },
{ 0x15, 0x11 },
{ 0x16, 0xE0 },
{ 0x17, 0x1C },
{ 0x1B, 0x1A },
{ 0x1C, 0x80 },
{ 0x1D, 0x40 },
{ 0x1F, 0x18 },
{ 0x20, 0x28 },
{ 0x23, 0x08 },
{ 0x25, 0x09 },
{ 0x37, 0x20 },
{ 0x39, 0x20 },
{ 0x3B, 0x20 },
{ 0x4D, 0x04 },
{ 0x4E, 0x59 },
{ 0x4F, 0xE6 },
{ 0x50, 0x09 },
{ 0x51, 0x59 },
{ 0x52, 0x12 },
{ 0x53, 0x1B },
{ 0x55, 0xE5 },
{ 0x5E, 0x80 },
{ 0x7D, 0x62 },
{ 0x04, 0x38 },
{ 0x06, 0x71 },

/*
NOTE: The following five repeated sentences are used here to wait memory initial complete, please don't remove...(you could refer to Appendix A of programming guide document (CH7025(26)B Programming Guide Rev2.03.pdf or later version) for detailed information about memory initialization! 
*/
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },

{ 0x06, 0x70 },
{ 0x02, 0x02 },
{ 0x02, 0x03 },
{ 0x04, 0x00 },
#if 0
{ 0x02, 0x01 },
{ 0x02, 0x03 },
{ 0x03, 0x00 },
{ 0x04, 0x39 },
{ 0x08, 0x08 },
{ 0x09, 0x80 },
{ 0x0C, 0x82 },
{ 0x0D, 0x08 },
{ 0x0F, 0x1A },
{ 0x10, 0x80 },
{ 0x11, 0x16 },
{ 0x12, 0x40 },
{ 0x13, 0x54 },
{ 0x15, 0x11 },
{ 0x16, 0xE0 },
{ 0x17, 0x1C },
{ 0x1B, 0x1A },
{ 0x1C, 0x80 },
{ 0x1D, 0x48 },
{ 0x1F, 0x10 },
{ 0x20, 0x40 },
{ 0x21, 0x09 },
{ 0x23, 0xF4 },
{ 0x25, 0x01 },
{ 0x37, 0x20 },
{ 0x39, 0x20 },
{ 0x3B, 0x20 },
{ 0x4D, 0x04 },
{ 0x4E, 0x66 },
{ 0x4F, 0x6A },
{ 0x50, 0x0F },
{ 0x51, 0x59 },
{ 0x52, 0x12 },
{ 0x53, 0x1B },
{ 0x55, 0xE5 },
{ 0x5E, 0x80 },
{ 0x7D, 0x62 },
{ 0x04, 0x38 },
{ 0x06, 0x71 },

/*
NOTE: The following five repeated sentences are used here to wait memory initial complete, please don't remove...(you could refer to Appendix A of programming guide document (CH7025(26)B Programming Guide Rev2.03.pdf or later version) for detailed information about memory initialization! 
*/
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },

{ 0x06, 0x70 },
{ 0x02, 0x02 },
{ 0x02, 0x03 },
{ 0x04, 0x00 },
#endif
};

struct IIC_data CH7026_REGS_TV[] = {

{ 0x02, 0x01 },
{ 0x02, 0x03 },
{ 0x03, 0x00 },
{ 0x04, 0x39 },
{ 0x0C, 0x82 },
{ 0x0D, 0x03 },
{ 0x0E, 0xE4 },
{ 0x0F, 0x23 },
{ 0x10, 0x66 },
{ 0x11, 0x2E },
{ 0x12, 0x40 },
{ 0x15, 0x12 },
{ 0x16, 0x58 },
{ 0x17, 0x9E },
{ 0x1C, 0x14 },
{ 0x1D, 0xC0 },
{ 0x21, 0x12 },
{ 0x22, 0x0E },
{ 0x23, 0x71 },
{ 0x4D, 0x03 },
{ 0x4E, 0xC5 },
{ 0x4F, 0x7F },
{ 0x50, 0x7B },
{ 0x51, 0x59 },
{ 0x52, 0x12 },
{ 0x53, 0x1B },
{ 0x55, 0xE5 },
{ 0x5E, 0x80 },
{ 0x7D, 0x62 },
{ 0x04, 0x38 },
{ 0x06, 0x71 },

/*
NOTE: The following five repeated sentences are used here to wait memory initial complete, please don't remove...(you could refer to Appendix A of programming guide document (CH7025(26)B Programming Guide Rev2.03.pdf or later version) for detailed information about memory initialization! 
*/
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },
{ 0x03, 0x00 },

{ 0x06, 0x70 },
{ 0x02, 0x02 },
{ 0x02, 0x03 },
{ 0x04, 0x00 },
};
#define CH7026_REG_NUM_VGA_640 (sizeof(CH7026_REGS_VGA_640)/sizeof(CH7026_REGS_VGA_640[0]))

#define CH7026_REG_NUM_VGA_800 (sizeof(CH7026_REGS_VGA_800)/sizeof(CH7026_REGS_VGA_800[0]))
#define CH7026_REG_NUM_TV (sizeof(CH7026_REGS_TV)/sizeof(CH7026_REGS_TV[0]))

#endif /* _SMDK2440_OV9650_H_ */

